package handler;

import org.codehaus.jackson.JsonNode;

import play.mvc.Result;
import play.mvc.Results;
import util.ResponseUtil;

class HandlerUtil {
    
    static Result responseSuccess(final int action) {
        return Results.ok(ResponseUtil.success(action));
    }

    static Result responseSuccess(final int action, final JsonNode data) {
        return Results.ok(ResponseUtil.success(action, data));
    }

    static Result responseError(final int action, final int errorCode) {
        return Results.ok(ResponseUtil.fail(action, errorCode));
    }

}
